_Pragma("once");

#include <string>
#include <vector>

#include "EditablePage.h"
#include "EditablePage.h"
#include "Log.h"
#include "MultiPage.h"

/**
* @author lizb
*/
class ScrollEditablePage : public MultiPage<EditablePage> {
    using super = MultiPage<EditablePage>;
    using super::super;
public:

    void initialize() override {
    }

    void beforeDisplay() override{
        initEditors();

        super::beforeDisplay();
    }

    int onKeyEnt(const KeyCode& keyCode) override{
        int returnCode = 2;
        if (this->focus && (mmultiPageNo + 1) == mpageSize) {
            returnCode = super::onKeyEnt(keyCode);
        } else {
            switchToNextPage();//翻页
        }

        return returnCode;
    }


    void doSetPageNo(const int pageNo) override;

    std::vector<BasicEditorVector> mscrollEditors;
};


